package service

import (
	"boy-go/modules/system/vo"
)

type SysRoleService interface {
	GetById(roleId int64) (*vo.SysRoleModel, error)
	List(req *vo.QuerySysRoleReq) (*vo.ListSysRoleRsp, error)
	SelectRoleAll() []*vo.SysRoleModel
	Add(req *vo.AddSysRoleReq) (*vo.AddSysRoleRsp, error)
	Edit(req *vo.EditSysRoleReq) (*vo.EditSysRoleRsp, error)
	AuthDataScope(req *vo.EditSysRoleReq) error
	Del(roleId int64) error
	DeleteRoleByIds(roleIds []*int64) error
	CheckRoleNameUnique(roleId int64, roleName *string) bool //校验角色名称是否唯一
	CheckRoleKeyUnique(roleId int64, roleKey *string) bool   //校验角色权限是否唯一
	CheckRoleAllowed(roleId *int64) error
	CheckRoleDataScope(roleIds ...int64) error
	SelectRolesByUserId(userId int64) []*vo.SysRoleModel
	SelectRolePermissionByUserId(userId int64) []*string  //根据用户ID查询权限
	DeleteAuthUser(roleId int64, userId int64) error      //取消授权用户角色
	DeleteAuthUsers(roleId int64, userIds []*int64) error //批量取消授权用户角色
	InsertAuthUsers(roleId int64, userIds []*int64) error
}
